<%@ Control Language="C#" AutoEventWireup="true" Codebehind="Feedbacks.ascx.cs" Inherits="Doctors_WebForum.Admin.UIControls.Feedbacks" %>

<script src="Js/style.js" type="text/javascript"></script>

<script type="text/javascript">
// Popup window code
function newPopup(url) {
	popupWindow = window.open(
		url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=no,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
}
</script>

<div class="tab_content">
    <div class="pageIntro">
        <h2>
            Managerment Feedbacks</h2>
        <p>
            Here's administrator can update/view.delete information about feebacks from users</p>
    </div>
    <div class="contentBox">
        <div class="contentBoxTop">
            <h3>
                <asp:LinkButton ID="lbkListUser" runat="server" OnClick="lbkListUser_Click">List information about feedbacks from users</asp:LinkButton></h3>
            <label id="search" class="smallInput">
                Quick Find :
                <asp:TextBox ID="txtSearch" runat="server" OnTextChanged="txtSearch_TextChanged"></asp:TextBox>
            </label>
        </div>
        <div class="innerContent">
            <!--Message will active if cann not load data-->
            <asp:Label ID="lblMessage" runat="server"></asp:Label>
            <!--Load list users with paging using datalist controls-->
            <asp:DataList ID="dtlUser" runat="server" CssClass="sTable" DataKeyField="FeedBackID"
                OnDeleteCommand="dtlUser_DeleteCommand">
                <HeaderTemplate>
                    <thead id="table_header">
                        <tr>
                            <th>
                                <strong>
                                    <asp:LinkButton ID="lbkFullName" OnClick="SortName" runat="server">FullName</asp:LinkButton></strong></th>
                            <th>
                                <strong>
                                    <asp:LinkButton ID="lbkEmail" OnClick="SortEmail" runat="server">Email</asp:LinkButton></strong></th>
                            <th>
                                <strong>Title</strong></th>
                            <th>
                                <strong>Content</strong>
                            </th>
                            <th>
                                <strong>
                                    <asp:LinkButton ID="lbkSendDate" OnClick="SendDate" runat="server">SendDate</asp:LinkButton></strong></th>
                            <th>
                                <strong>Edit</strong></th>
                        </tr>
                    </thead>
                </HeaderTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
                <ItemTemplate>
                    <tr class="oddRow">
                        <a href="JavaScript:newPopup('DetailsObject.aspx?ID=<%#Eval("FeedbackID") %>&view=feed');">
                            <td class="firstCol">
                                <%#DataBinder.Eval(Container.DataItem,"FullName")%>
                            </td>
                            <td class="secondCol">
                                <%#Eval("Email")%>
                            </td>
                            <td>
                                <%#Eval("Tilte")%>
                            </td>
                            <td>
                                <%#Eval("Content")%>
                            </td>
                            <td>
                                <%# Convert.ToDateTime(Eval("SendDate")).ToShortDateString()%>
                            </td>
                        </a>
                        <td class="editItem">
                            <ul>
                                <li class="iconDel">
                                    <asp:LinkButton Text="delete" CommandName="Delete" runat="server" ID="lbtnDelete"
                                        OnClientClick="return confirm ('Are you sure want to delete ?')" />
                                </li>
                            </ul>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:DataList>
            <asp:Label ID="lblResultPaging" runat="server" Visible="false"></asp:Label>
            <table border="0" cellpadding="0" cellspacing="0" id="pagging_box">
                <tr>
                    <td valign="middle">
                        <asp:LinkButton ID="lbtnPrevious" runat="server" Text="Previous Page" class="selected"
                            OnClick="lbtnPrevious_Click">Previous</asp:LinkButton>
                    </td>
                    <td valign="middle" align="right">
                        <asp:DataList ID="DLPAGING" runat="server" RepeatDirection="Horizontal" OnItemCommand="DLPAGING_ItemCommand">
                            <ItemTemplate>
                                <asp:LinkButton ID="imgbtnNumber" class="selected" runat="server" Text='<%# Eval("DisplayName") %>'
                                    Visible='<%# Eval("LinkButtonVisible") %>' CommandArgument='<%# Eval("Value") %>'
                                    CommandName="Paging" />
                                <asp:Label class="paging" ID="lblNumber" runat="server" ToolTip="Selected Page" Visible='<%# Eval("LabelVisible") %>'
                                    Text='<%# "&nbsp;"+ Eval("DisplayName") + "&nbsp;"%>'></asp:Label>
                            </ItemTemplate>
                        </asp:DataList>
                    </td>
                    <td valign="middle">
                        <asp:LinkButton ID="lbtnNext" runat="server" class="selected" Text="Next Page" OnClick="NextPage">Next</asp:LinkButton>
                    </td>
                </tr>
            </table>
        </div>
        <!--end of #box-3-->
    </div>
</div>
